import request from "../../http";
const bannerApi = {
  async getBannerData(query) {
    return request({
      url: "/api/banner/list",
      method: "get",
      params: query
    });
  },
  async queryBannerData(query) {
    return request({
      url: "/api/banner/list",
      method: "get",
      params: query
    });
  },
  async postBannerData(params) {
    return request({
      url: "/api/banner",
      method: "post",
      data: params
    });
  },
  async getBannerDetail(id) {
    return request({
      url: `/api/banner/${id}`,
      method: "get"
    });
  },
  async delBannerDatas(ids) {
    return request({
      url: "/api/banner",
      method: "delete",
      data: ids
    });
  },
  async getCategoryData(id) {
    return request({
      url: `/api/category/listSon/${id}`,
      method: "get"
    });
  }
};

export default bannerApi;
